package com.pospi.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.pospi.dto.GiveBeen;
import com.pospi.dto.GoodsDto;
import com.pospi.dto.ProGoodsBeen;
import com.pospi.dto.Promotionbeen;
import com.pospi.dto.ReduceProBeen;
import com.pospi.dto.SingleProBeen;
import com.pospi.dto.Tablebeen;
import com.pospi.pai.yunpos.been.LogBeen;
import com.pospi.dto.ScalesBeen;

import com.pospi.greendao.GiveBeenDao;
import com.pospi.greendao.GoodsDtoDao;
import com.pospi.greendao.ProGoodsBeenDao;
import com.pospi.greendao.PromotionbeenDao;
import com.pospi.greendao.ReduceProBeenDao;
import com.pospi.greendao.SingleProBeenDao;
import com.pospi.greendao.TablebeenDao;
import com.pospi.greendao.LogBeenDao;
import com.pospi.greendao.ScalesBeenDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig giveBeenDaoConfig;
    private final DaoConfig goodsDtoDaoConfig;
    private final DaoConfig proGoodsBeenDaoConfig;
    private final DaoConfig promotionbeenDaoConfig;
    private final DaoConfig reduceProBeenDaoConfig;
    private final DaoConfig singleProBeenDaoConfig;
    private final DaoConfig tablebeenDaoConfig;
    private final DaoConfig logBeenDaoConfig;
    private final DaoConfig scalesBeenDaoConfig;

    private final GiveBeenDao giveBeenDao;
    private final GoodsDtoDao goodsDtoDao;
    private final ProGoodsBeenDao proGoodsBeenDao;
    private final PromotionbeenDao promotionbeenDao;
    private final ReduceProBeenDao reduceProBeenDao;
    private final SingleProBeenDao singleProBeenDao;
    private final TablebeenDao tablebeenDao;
    private final LogBeenDao logBeenDao;
    private final ScalesBeenDao scalesBeenDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        giveBeenDaoConfig = daoConfigMap.get(GiveBeenDao.class).clone();
        giveBeenDaoConfig.initIdentityScope(type);

        goodsDtoDaoConfig = daoConfigMap.get(GoodsDtoDao.class).clone();
        goodsDtoDaoConfig.initIdentityScope(type);

        proGoodsBeenDaoConfig = daoConfigMap.get(ProGoodsBeenDao.class).clone();
        proGoodsBeenDaoConfig.initIdentityScope(type);

        promotionbeenDaoConfig = daoConfigMap.get(PromotionbeenDao.class).clone();
        promotionbeenDaoConfig.initIdentityScope(type);

        reduceProBeenDaoConfig = daoConfigMap.get(ReduceProBeenDao.class).clone();
        reduceProBeenDaoConfig.initIdentityScope(type);

        singleProBeenDaoConfig = daoConfigMap.get(SingleProBeenDao.class).clone();
        singleProBeenDaoConfig.initIdentityScope(type);

        tablebeenDaoConfig = daoConfigMap.get(TablebeenDao.class).clone();
        tablebeenDaoConfig.initIdentityScope(type);

        logBeenDaoConfig = daoConfigMap.get(LogBeenDao.class).clone();
        logBeenDaoConfig.initIdentityScope(type);

        scalesBeenDaoConfig = daoConfigMap.get(ScalesBeenDao.class).clone();
        scalesBeenDaoConfig.initIdentityScope(type);

        giveBeenDao = new GiveBeenDao(giveBeenDaoConfig, this);
        goodsDtoDao = new GoodsDtoDao(goodsDtoDaoConfig, this);
        proGoodsBeenDao = new ProGoodsBeenDao(proGoodsBeenDaoConfig, this);
        promotionbeenDao = new PromotionbeenDao(promotionbeenDaoConfig, this);
        reduceProBeenDao = new ReduceProBeenDao(reduceProBeenDaoConfig, this);
        singleProBeenDao = new SingleProBeenDao(singleProBeenDaoConfig, this);
        tablebeenDao = new TablebeenDao(tablebeenDaoConfig, this);
        logBeenDao = new LogBeenDao(logBeenDaoConfig, this);
        scalesBeenDao = new ScalesBeenDao(scalesBeenDaoConfig, this);

        registerDao(GiveBeen.class, giveBeenDao);
        registerDao(GoodsDto.class, goodsDtoDao);
        registerDao(ProGoodsBeen.class, proGoodsBeenDao);
        registerDao(Promotionbeen.class, promotionbeenDao);
        registerDao(ReduceProBeen.class, reduceProBeenDao);
        registerDao(SingleProBeen.class, singleProBeenDao);
        registerDao(Tablebeen.class, tablebeenDao);
        registerDao(LogBeen.class, logBeenDao);
        registerDao(ScalesBeen.class, scalesBeenDao);
    }
    
    public void clear() {
        giveBeenDaoConfig.clearIdentityScope();
        goodsDtoDaoConfig.clearIdentityScope();
        proGoodsBeenDaoConfig.clearIdentityScope();
        promotionbeenDaoConfig.clearIdentityScope();
        reduceProBeenDaoConfig.clearIdentityScope();
        singleProBeenDaoConfig.clearIdentityScope();
        tablebeenDaoConfig.clearIdentityScope();
        logBeenDaoConfig.clearIdentityScope();
        scalesBeenDaoConfig.clearIdentityScope();
    }

    public GiveBeenDao getGiveBeenDao() {
        return giveBeenDao;
    }

    public GoodsDtoDao getGoodsDtoDao() {
        return goodsDtoDao;
    }

    public ProGoodsBeenDao getProGoodsBeenDao() {
        return proGoodsBeenDao;
    }

    public PromotionbeenDao getPromotionbeenDao() {
        return promotionbeenDao;
    }

    public ReduceProBeenDao getReduceProBeenDao() {
        return reduceProBeenDao;
    }

    public SingleProBeenDao getSingleProBeenDao() {
        return singleProBeenDao;
    }

    public TablebeenDao getTablebeenDao() {
        return tablebeenDao;
    }

    public LogBeenDao getLogBeenDao() {
        return logBeenDao;
    }

    public ScalesBeenDao getScalesBeenDao() {
        return scalesBeenDao;
    }

}
